package com.andyage.admin.action;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.andyage.admin.service.IAdfodderdirectoryService;
import com.andyage.admin.bean.AdfodderdirectoryBean;

@Controller
public class AdfodderdirectoryAction {
	@Resource
	private IAdfodderdirectoryService iadfodderdirectoryService;
	/**
	 * 查询文件夹
	 * @param adfodder
	 * @return
	 */
	@RequestMapping("/queryAdfodderdirectory")
	public void queryAdfodderdirectory(AdfodderdirectoryBean adfodder,HttpServletRequest request,HttpServletResponse response){
		try {
			iadfodderdirectoryService.queryAdfodderdirectory(adfodder, request, response);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
	
	/**
	 * 新建文件夹
	 * @param adfodder
	 * @return
	 */
	@RequestMapping("/addAdfodderdirectory")
	public void addAdfodderdirectory(HttpServletRequest request,HttpServletResponse response){
		try {
			iadfodderdirectoryService.addAdfodderdirectory(request, response);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
	/**
	 * 文件夹更名
	 * @param adfodder
	 * @return
	 */
	@RequestMapping("/updateAdfodderdirectory")
	public void updateAdfodderdirectory(HttpServletRequest request, HttpServletResponse response){
		try {
			iadfodderdirectoryService.updateAdfodderdirectory(request, response);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
	/**
	 * 删除文件夹
	 * @param adfodder
	 * @return
	 */
	@RequestMapping("/deleteAdfodderdirectory")
	public void deleteAdfodderdirectory(HttpServletRequest request,HttpServletResponse response){
		try {
			iadfodderdirectoryService.deleteAdfodderdirectory(request, response);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
